package c4.demo1.Example20_23;

class Outer{
    int m=0;
    void test1(){
        System.out.println("外部类Outer成员的test1()");
    }
    static class InnerStatic{
        int n =1;
        void show(){
            System.out.println("show");
        }
    }
    class Inner{
        int n=1;
        void show1(){
            System.out.println("打印外部类Outer的m值"+m);
            test1();
        }
        void show2(){
            System.out.println("内部类成员方法show2()");
        }
    }
    void test2(){
        Inner inner =new Inner();
        System.out.println("内部成员变量n="+inner.n);
        inner.show2();
    }
}
public class example20 {
    public static void main(String[] args) {
        Outer outer = new Outer();
        Outer.Inner inner = outer.new Inner();
        inner.show1();
        outer.test2();
        Outer.InnerStatic is = new Outer.InnerStatic();
        is.show();
    }
}
